<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<link rel="stylesheet" href="css/amazeui.min.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/amazeui.min.css" type="text/css" />
		<link rel="stylesheet" href="css/style.css" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/css/style.css" type="text/css" />
	</head>
	<body>
        <div class="logo"><img src="images/logo.png" style="width: 280px;"/></div>
        <input type="text" name="phone" id="phone" placeholder="请输入手机号" class="login-name" style="border-radius: 50px;">
        <input type="password" name="passWord" id="passWord" placeholder="请输入密码" class="login-password" style="border-radius: 50px;">
		<input type="button" value="登录" class="money-btn" style="border-radius: 50px;">
		<p class="login-text"> 没有账号？点此<a href="reg.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/reg.html" class="reg" >注册</a>
        	<a href="pwdfind.html" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/pwdfind.html" class="password">忘记密码</a>
    	</p>
    	<div>
    		<p style="text-align: center;">其他登陆方式</p>
    		<a onclick="wxlogin();" style="margin-left: 43%;margin-top: 20px;" class="am-icon-btn am-success am-icon-weixin"></a>    		
    	</div>
	</body>
	<script type="text/javascript" src="js/jquery.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/jquery.min.js" ></script>
	<script type="text/javascript" src="js/amazeui.min.js" tppabs="http://yanshi.sucaihuo.com/modals/16/1608/demo/js/amazeui.min.js"></script>
	<script type="text/javascript" src="js/hui.js"></script>
	<script>
		$(".money-btn").click(function(){
			var phone = $("#phone").val();
			var password = $("#passWord").val();
			if(!phone){
				hui.toast("手机号不能为空", 1000);
				return false;
			}
			if(!password){
				hui.toast("密码不能为空", 1000);
				return false;
			}
			hui.postJSON(
			    rootpath+'/businessMan/login',
			    {
			    	phone:phone,
			    	password:password
			    },
			    function(msg){
			    	if(msg.result=="fail"){
			    		hui.toast(msg.message, 1000);
			    		return false;
			    	}else{
						localStorage.removeItem("id");
						localStorage.setItem("id",msg.message);
						location.href="index.html";
			    	}
			    },
			    function(e){
			        hui.iconToast('读取消息失败', 'warn');
			        console.log(e);
			    }
			);
		});
		function wxlogin(){
			location.href="http://mykefang.com/login";
		}
	</script>
</html>

<!--BusinessManVo businessManVo = businessManService.findByOpenId(openid);
                if(businessManVo!=null){
                    return Message.success(JSONObject.toJSONString(businessManVo));
                }else{
                    String userInfo = msgInfo.getUserInfo(accessToken, openid);
                    try {
                        userInfo = new String(userInfo.getBytes("ISO8859-1"), "utf-8"); // 转码
                        JSONObject userInfoJSON = JSON.parseObject(userInfo);
                        BusinessManVo businessManVo1 = new BusinessManVo();
                        businessManVo1.setName(userInfoJSON.getString("nickname"));
                        businessManVo1.setFaceImg(userInfoJSON.getString("headimgurl"));
                        businessManVo1.setWxopenid(openid);
                        businessManVo1.setHotelSinName("未填写");
                        businessManVo1.setHotelName("未填写");
                        businessManVo1.setName(userInfoJSON.getString("nickname"));
                        businessManVo1.setIsActive((byte) 0);
                        businessManVo1.setCreateTime(new Date());
                        businessManVo1.setType(0);
                        businessManService.save(businessManVo1);
                        return Message.success(businessManVo1.getId()+"");
                    } catch (UnsupportedEncodingException e) {
                        e.printStackTrace();
                        return Message.fail("资料转码错误!");
                    }
                }-->
